package day6;

/**
 * @author oldliu
 * @since 1.0
 */
public class Arr2 {
    public static void main(String[] args) {
        int[][] a = new int[5][30];
        //2*4 ,4*2? 4*2
        int[][] b = {{1, 2}, {2, 3}, {4, 6}, {7, 8}};
        for (int i = 0; i < b.length; i++) {
            for (int j = 0; j < b[i].length; j++) {
                System.out.print(b[i][j] + " ");
            }
            System.out.println();
        }
        int c[][] = new int[5][];
        c[0] = new int[]{1, 3, 6, 7, 10};
        c[1] = new int[]{1, 3, 6, 7, 10, 11, 12, 14, 16};
        c[2] = new int[]{1, 3};
        c[3] = new int[]{1, 88};
        c[4] = new int[]{33, 45, 10};
        System.out.println(">>>>>>>>>>>>>>>>>>>>>>>>>");
        for (int i = 0; i < c.length; i++) {
            for (int j = 0; j < c[i].length; j++) {
                System.out.print(c[i][j] + " ");
            }
            System.out.println();
        }
        int socre[] = new int[c.length];
        for (int i = 0; i < c.length; i++) {
            for (int j = 0; j < c[i].length; j++) {
                socre[i] += c[i][j];
            }
        }
        for (int i = 0; i < socre.length; i++) {
            System.out.println("第" + (i + 1) + "个班的成绩是：" + socre[i]);
        }
    }
}
